﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FHtool
{
    public partial class MainForm : Form
    {
        //FormCollection Form_all = Application.OpenForms;

        public MainForm()
        {
            InitializeComponent();
            this.IsMdiContainer = true;
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            //this.WindowState = FormWindowState.Maximized;

            // 默认启动温控调试工具窗口
            stcForm form = new stcForm();
            form.MdiParent = this; //指定父窗体
            //form.WindowState = FormWindowState.Maximized;//最大化
            form.Show(); //窗口显示
        }

        private void MenuItem_stc_Click(object sender, EventArgs e)
        {
            
        }

        #region 菜单打开串口调试助手
        private void MenuItem_OpenSerialTool_Click(object sender, EventArgs e)
        {
            if (!SerialToolForm.formIsOpen)
            {
                SerialToolForm form = new SerialToolForm();
                form.MdiParent = this;
                form.MaximizeBox = false;//无最大化按钮
                form.MinimizeBox = false;//无最小化按钮
                form.Show();
            }
        }
        #endregion
    }
}
